package com.dunka.demo.mapper;

import com.dunka.demo.pojo.Data_Dictionary;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author Dunka
 * @Description 数据字典Mapper接口
 * @Date 10:30   2019/7/25
 * @ClassName Data_DictionaryMapper
 */
@Repository
public interface Data_DictionaryMapper {
    /***
    * @Description: 获取所有的数据字典数据
    * @Param:
    * @return: java.util.List<com.dunka.demo.pojo.Data_Dictionary>
    * @Author: Dunka
    * @Date: 2019/7/25 12:00
    */
    public List<Data_Dictionary> getAllData_Dictionary(Map<String,Object> data);

    /***
    * @Description: 通过传入id获得对应的Data_Dictionary
    * @Param: [id]
    * @return: com.dunka.demo.pojo.Data_Dictionary
    * @Author: Dunka
    * @Date: 2019/7/29 14:49
    */
    public Data_Dictionary getData_DicitonaryById(int id);
    /***
    * @Description: 增加数据字典
    * @Param: [data_dictionary]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/29 14:48
    */
    public boolean addData_Dictionary(Data_Dictionary data_dictionary);

    /***
    * @Description: 根据id删除数据字典
    * @Param: [id]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/29 14:51
    */
    public boolean deleteData_Dictionary(int id);

    /***
    * @Description: 修改数据字典
    * @Param: [data_dictionary]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/29 14:51
    */
    public boolean updateData_Dictionary(Data_Dictionary data_dictionary);

    /***
    * @Description: 批量添加数据
    * @Param: [list]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/29 16:59
    */
    public boolean batchAddData_Dictionary(@Param("list") List<Data_Dictionary> list);

    /***
    * @Description: 获取数据字典的总数
    * @Param: []
    * @return: int
    * @Author: Dunka
    * @Date: 2019/7/30 10:13
    */
    public Integer countData_Dictionary(Map<String,Object> data);
}
